package com.victor.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.victor.dao.AgeDao;
import com.victor.dao.PraiseDao;
import com.victor.entity.Age;
import com.victor.entity.Praise;
import com.victor.service.AgeService;
import com.victor.service.PraiseService;

@Service
public class PraiseServiceImpl implements PraiseService {
	@Autowired
	private PraiseDao pDao;

	@Override
	public boolean insPraise(Praise praise) {
		return pDao.insPraise(praise) > 0 ? true : false;
	}

	@Override
	public Integer selPraiseByPid(int pid) {
		return pDao.selPraiseByPid(pid);
	}

	@Override
	public Integer selectPraise(Praise praise) {
		return pDao.selPraise(praise);
	}

	@Override
	public List<Praise> selPraiseByFlag(int uid) {
		return pDao.selPraiseByFlag(uid);
	}

	@Override
	public boolean updPraise(int uid,int pid) {
		return pDao.updPraise(uid,pid);
	}


}
